function cal()
{
var lp=document.getElementsByName('lpg')[0].value;
if (lp==0)
{
alert("FIELD SHOULD NOT REMAIN EMPTY");
}
var wo=lp*5;
document.getElementById("wood").innerHTML= wo+" Kgs/Hr";
var mo=document.getElementsByName('month')[0].value;
var hr=document.getElementsByName('hour')[0].value;
if (hr > 24)
{
alert("TOTAL NUMBER OF HOURS PER DAY SHOULD BE LESS THEN OR EQUAL TO 24");
hr=24;
document.getElementsByName('hour')[0].value=24;

}

var lc=hr*mo*lp*30;
var wc=hr*mo*wo*30;
 document.getElementById('lpgcm').innerHTML=lc+" Kgs/M";
 document.getElementById('woodcm').innerHTML=wc+" Kgs/M";
var tc=lc*document.getElementsByName('costl')[0].value;
var tw=wc*document.getElementsByName('costw')[0].value;
document.getElementById('lpgcost').innerHTML=tc+" /M";
 document.getElementById('woodcost').innerHTML=tw+" /M" ;
var gross=tc-tw+" /-";
 document.getElementById('gross').innerHTML=gross;

}
